{extend name="main/index" /}
{block name="main"}
<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="#">经营管理模块</a>
            </li>

            <li class="active">投标立项申请</li>
        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">
                <span class="input-icon">
                    <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                    <i class="icon-search nav-search-icon"></i>
                </span>
            </form>
        </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <div class="page-header">
            <h1 style="margin-left: 350px">
                投标立项申请表
            </h1>
        </div>
        {volist name="data" id="v"}
        <div class="row">
            <div class="col-xs-12">
                <form class="form-horizontal" role="form" >
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 项目名称 : </label>

                        <div class="col-sm-9">
                            <input type="text" id="form-field-1" value="{$v['bid_project']}" name="bid_project" class="col-xs-10 col-sm-5" readonly />
                        </div>
                    </div>

                    <div class="space-4"></div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 招标单位 : </label>

                        <div class="col-sm-9">
                            <input type="text" id="form-field-2" value="{$v['tenderer']}" readonly name="tenderer" class="col-xs-10 col-sm-5" />
                        </div>
                    </div>
                    <div class="space-4"></div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 招标时间 : </label>

                        <div class="col-sm-9">
                            <input type="text" id="form-field-2" value="{$v['bids_time']}" readonly name="bids_time" class="col-xs-10 col-sm-5" />
                        </div>
                    </div>
                    <div class="space-4"></div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 招标地点 : </label>

                        <div class="col-sm-9">
                            <input type="text" id="form-field-2" value="{$v['bids_address']}" readonly name="bids_address" class="col-xs-10 col-sm-5" />
                        </div>
                    </div>

                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 需求分析 : </label>

                        <div class="col-sm-9 ">
                            <input type="text" id="form-field-2" value="{$v['demand_analysis']}" readonly name="demand_analysis" class="col-xs-10 col-sm-5 dd" />
                            <!-- <a href="" id="btn_uploadimg">点击查看</a> -->
                        </div>
                    </div>

                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 项目建议书 : </label>
                        <div class="col-sm-9">
                            <input type="text" id="form-field-2" value="{$v['project_proposal']}" readonly name="project_proposal" class="col-xs-10 col-sm-5" />
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="clearfix form-actions">
                        <div class="col-md-offset-3 col-md-9">
                            <a href="{:url('admin/flow/doFlow',['id'=>$v['id']])}" class="btn btn-info " type="submit">
                                <i class="icon-ok bigger-110"></i>
                                同意 下一步
                            </a>
                            &nbsp; &nbsp; &nbsp;
                            <a href="{:url('admin/flow/dontFlow',['id'=>$v['id']])}" class="btn" type="reset">
                                <i class="icon-undo bigger-110"></i>
                                不同意 撤回
                            </a>
                        </div>
                    </div>
            </form>
        </div>
        {/volist}
    </div>
</div>

{/block}

<!-- <script>

    $(function () {
        
           $("#btn_uploadimg").click(function () {
               var fileObj = document.getElementById("form-field-2").files[0]; // js 获取文件对象
               if (typeof (fileObj) == "undefined" || fileObj.size <= 0) {
                   alert("请选择文件");
                   return;
               }
               var formFile = new FormData();
               formFile.append("action", "UploadVMKImagePath");  
               formFile.append("file", fileObj); //加入文件对象
 
               //第一种  XMLHttpRequest 对象
               //var xhr = new XMLHttpRequest();
               //xhr.open("post", "/Admin/Ajax/VMKHandler.ashx", true);
               //xhr.onload = function () {
               //    alert("上传完成!");
               //};
               //xhr.send(formFile);
 
               //第二种 ajax 提交
 
               var data = formFile;
               $.ajax({
                   url: "/Admin/Ajax/VMKHandler.ashx",
                   data: data,
                   type: "Post",
                   dataType: "json",
                   cache: false,//上传文件无需缓存
                   processData: false,//用于对data参数进行序列化处理 这里必须false
                   contentType: false, //必须
                   success: function (result) {
                       alert("上传完成!");
                   },
               })
           })
       })
</script> -->
{block name="myjs"}
{js href="/static/admin/assets/js/toastr.min.js"}
<script>
    $(function(){
        $('.aggress-btn').click(function () {
              $.ajax({
                type: 'get',
                url: 'admin/bids/doFlow/' + $data['id'],
                dataType: 'json',
                success: function (data) {
                    console.log(data);
                },
                error: function () {
                    alert('AJAX执行失败');
                }
            });
        });
    });
    // 执行ajax删除
    function delAjax(id, obj) {
        $.ajax({
            type: 'delete',
            url: '/Engine/' + id,
            dataType: 'json',
            success: function (data) {
                console.log(data);
                if (data.status) {
                    toastr.success(data.info);
                    obj.remove();
                } else {
                    toastr.error(data.info, 'FBI WARNING:');
                }
            },
            error: function () {
                alert('AJAX执行失败');
            }
        });
    }

</script>



{/block}